package com.example.resourceSharingPlatform.controller;


import com.example.resourceSharingPlatform.entity.User_trans;
import com.example.resourceSharingPlatform.service.User_transService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class User_transController {
    @Autowired
    private User_transService user_transService;

    @GetMapping("/user_trans")
    List<User_trans> getUserTransByUserId(@RequestParam(value ="user_id")String user_id){
        return user_transService.queryTransByUserID(user_id);
    }
}
